#include <bits/stdc++.h>

using namespace std;

const int A = 10;

int main() {
	vector<int> a = {4, 3, 2, 2, 2, 1, 1};
	auto normal_iterator = lower_bound(a.begin(), a.end(), 1, greater<int>());
	cout << normal_iterator - a.begin() << endl;

	return 0;
}
